package org.assess.core.bean.node;

import java.util.ArrayList;
import java.util.List;

import org.assess.core.bean.BaseEntry;

/**
 * @description
 * @author XiaLongxiang
 * @createtime 2012-6-15 下午9:59:20
 */
public class Node extends BaseEntry {
    /** 序列化号 */
    private static final long serialVersionUID = -5944837730659656794L;
    
    private String id;
    
    private String name;
    
    private String type;

    private String parent_id;
    
    /** 子节点 */
    private List<Node> nodes;
    
    public Node() {
        this.id = "";
        this.name = "";
        this.type = "";
        this.parent_id = "";
    }

    public void addNode(Node node) {
        if (nodes == null) {
            nodes = new ArrayList<Node>();
        }
        nodes.add(node);
    }
    
    public String getId() {
        return id;
    }
    
    public void setId(String id) {
        this.id = id;
    }
    
    public String getName() {
        return name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    public String getType() {
        return type;
    }
    
    public void setType(String type) {
        this.type = type;
    }

    public String getParent_id() {
        return parent_id;
    }
    
    public void setParent_id(String parent_id) {
        this.parent_id = parent_id;
    }
    
    public List<Node> getNodes() {
        return nodes;
    }
    
    public void setNodes(List<Node> nodes) {
        this.nodes = nodes;
    }
}
